<%-- 
    Document   : ResultSearchCar
    Created on : Nov 2, 2011, 12:18:47 AM
    Author     : Mr-aUgust
--%>

<%@page pageEncoding="UTF-8"%>
<%@ page session="true" import="java.util.Collection,DAL.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>East2West Tours and Travels</title>
    </head>
    <%
    String username="";    
    String typeTour="";
    String numberOfChild="";
    String numberOfAdult="";
    String totalOfGuest="";
    String totalTMoney="";
    String startDate="";
    String endDate="";
    String dateBooking="";
    String cash="";
    String adultPrice="";
    String childPrice="";
    
    if(session.getAttribute("User")!=null) {
        
        username=session.getAttribute("User").toString();
        
        String tourId=session.getAttribute("tourIdB").toString();
        typeTour=session.getAttribute("typeTourB").toString();
        numberOfChild=session.getAttribute("numberOfChildB").toString();
        numberOfAdult=session.getAttribute("numberOfAdultB").toString();
        totalOfGuest=session.getAttribute("totalOfGuestB").toString();
        totalTMoney=session.getAttribute("totalMoneyB").toString();
        startDate=session.getAttribute("startDateB").toString();
        endDate=session.getAttribute("endDateB").toString();
        dateBooking=session.getAttribute("dateBookingB").toString();
        cash=session.getAttribute("cashB").toString();
       
        
        TourPackageBean tBill=new TourPackageBean();
        Collection coll=tBill.getPricetourPackage(tourId);
        request.setAttribute("ViewBillTour",coll);
        
    } else {
        out.println("<script>alert('Please login before view bills of the tour !');window.location='index.jsp';</script>");
        
    }
    %>
    <body>
        <center>
                <span style="font-size: 20px;color: #343434;">Details of Booking Tour</span></center>  
        <center>                 
            
        </center>     
                <table border="0" width="490">
                    <tr>
                        <td width="150">Tour name:</td><td  style="font-size:12px;font-family:Arial, Helvetica, sans-serif;"><b><%=typeTour%><b/></td>
                    </tr>
                    <c:forEach items="${ViewBillTour}" var="tpc">
                    <tr>
                        <td>Price Adult:</td><td>${tpc.adultPrice} USD/1 person</td>
                    </tr>
                    <tr>
                       <td >Price Child:</td><td ><b>${tpc.childPrice} USD/1 person</b></td>
                    </tr>
                    </c:forEach>
                    <tr>
                    <td colspan="2" ><h3>Details of the registration: </h3></td>
                </tr>
                    <tr>
                        <td >User name:</td><td ><%=username%></td>
                    </tr>
                    <tr>
                        <td >Start date of traveling:</td> <td ><%=startDate%></td>
                    </tr>
                    <tr>
                         <td >End date of traveling :</td> <td ><%=endDate%></td>
                    </tr>
                    <tr>
                        <td >Date booking :</td> <td ><%=dateBooking%></td>
                    </tr>
                    <tr>
                        <td >Number of children traveling:</td> <td ><%=numberOfChild%> person</td>
                    </tr>
                    <tr>
                        <td >Number of adults traveling:</td> <td ><%=numberOfAdult%> person</td>
                    </tr>
                    <tr>
                        <td >Total of guest :</td> <td ><%=totalOfGuest%> person</td>
                    </tr>
                    <tr>
                        <td >Sum money :</td><td ><%=totalTMoney%> USD</td>
                </tr>
                <tr>
                    <td >Method payment:</td> <td ><%=cash%></td>
                </tr>                  
                </table>
               
        
    </body>
</html>
